package com.choudou5.solr.framework.constants;

/**
 * @name solr常量
 * @author choudou5
 * @date：2018-07-27
 */
public interface SolrConsts {

    String KEY_KEYWORDS = "keywords";

    enum EventType {

        RELOAD_EXT_DIC("reloadExtDic", "重新加载字典"),
        ;

        EventType(String key, String desc) {
            this.key = key;
            this.desc = desc;
        }

        private String key;
        private String desc;

        public static EventType get(String key){
            EventType[] values = values();
            for (EventType type : values) {
                if(type.getKey().equals(key)) {
                    return type;
                }
            }
            return null;
        }

        public String getKey() {
            return key;
        }
        public String getDesc() {
            return desc;
        }
    }
}
